#pragma once

#include "Report.h"
#include "afxsock.h"

class ECMUpload
{
public:
	ECMUpload(void);
	~ECMUpload(void);

	LONG	Idx;
	void Run(CReport *preport, CFile *pfile, LPCTSTR ServerName, unsigned short port, LPCTSTR, LPCTSTR);

	CFile	*pfile;
	CString	ServerName;
	unsigned short	port;
	CString	DOM, Cookie;
	CReport	*preport;

	BOOL Upload(CFile *sf);
	BOOL GetResponse(CFile *sf);
	void Cancel();

private:
	BOOL	going_to_shutdown;
	CArchive	*preader;
	CRITICAL_SECTION	CS;
};
